import { IsString, IsJSON, IsEnum, IsPhoneNumber, IsArray, Min, Length, IsOptional, IsBoolean,IsNumber, IsNumberString, IsEmail, IsDateString } from 'class-validator';
import { ApiProperty, PartialType } from '@nestjs/swagger';
import { PagingDto } from 'src/common/dto/index';

export enum TypeEnum {
    Mengxue = '0',
    Youmengying = '1',
    Chuci = '2',
    Lunyu = '3',
    Daxue = "4",
    Zhongyong = '5',
    Mengzi = '6',
}

export class CreateClassicsDto {
    @ApiProperty({ required: true })
    @Length(0,255)
    poetry_id: string; 

    @ApiProperty({ required: true })
    @Length(0,255)
    title: string;

    @ApiProperty({ required: true })
    @Length(0,255)
    @IsEnum(TypeEnum)
    type: string;

    @ApiProperty({ required: false })
    content: string;

    @ApiProperty({ required: false })
    abstract: string;

    @ApiProperty({ required: false })
    origin: string;

    @ApiProperty({ required: false })
    chapter: string;

    @ApiProperty({ required: false })
    preface: string;

    @ApiProperty({ required: false })
    spells: string;


    @ApiProperty({ required: true })
    @Length(0,255)
    type_name: string;

    @ApiProperty({ required: true })
    @Length(0,255)
    author: string;

    @ApiProperty({ required: true })
    tags:string;


    @ApiProperty({ required: true })
    paragraphs:string;


    @ApiProperty({ required: false })
    prologue:string;

    @ApiProperty({ required: false })
    notes:string;




}